"""
@File    :   main.py
@Time    :   2024/01/07 20:00:35
@Author  :   Qrj
@Email   :   923207736@qq.com
@description   :   服务端入口文件
"""

if __name__ == "__main__":
    import uvicorn
    from src.config import get_app_settings

    # 获取配置
    settings = get_app_settings()
    # 获取app路径
    app_path = "app.app:app"
    # 开启uvicorn
    uvicorn.run(
        app_path,
        host=settings.host,
        port=settings.port,
        reload=settings.uvicorn_reload,
        access_log=settings.uvicorn_access_log,
        ws_max_size=settings.uvicorn_ws_max_size,
        workers=settings.uvicorn_workers
    )